/*
 * InputOutputManager.cpp
 *
 *  Created on: 2012-04-22
 *      Author: mm
 */

#include "InputOutputManager.h"

InputOutputManager* InputOutputManager::instance_ = 0L;

void InputOutputManager::readFile(const std::string& filename)
{
	std::ifstream inputFile;
	std::string temp;

	inputFile.open(filename.c_str());
	if(!inputFile.is_open())
	{
		std::cout << "File open error. The program will now terminate."<< std::endl;
		exit(1);
	}

	while(!inputFile.eof()) 		//main loop of method - the file will be read line by line
	{
		getline(inputFile, temp);
		TestGenerator::getInstance()->addText(InputParser::getInstance()->parseLine(temp));
	}

	inputFile.close();
}

void InputOutputManager::writeFile(const std::string& filename)
{

}

